package com.zhangxi.line.dao;

import com.zhangxi.line.pojo.NewsHeadline;
import com.zhangxi.line.pojo.vo.HeadlineDetailVo;
import com.zhangxi.line.pojo.vo.HeadlinePageVo;
import com.zhangxi.line.pojo.vo.HeadlineQueryVo;

import java.util.List;

/**
 * ClassName: NewsHeadLineDao
 * Package: com.zhangxi.line.dao
 */
public interface NewsHeadLineDao {
    /**
     * 根据查询条件,查询满足条件的记录数
     * @param headLineQueryVo
     * @return
     */
    int findPageCount(HeadlineQueryVo headLineQueryVo);

    /**
     * 根据查询条件,查询当前页数据
     * @param headLineQueryVo
     * @return
     */
    List<HeadlinePageVo> findPageList(HeadlineQueryVo headLineQueryVo);
    /**
     * 多表查询新闻详情
     * @param hid
     * @return
     */
    HeadlineDetailVo findHeadlineDetail(Integer hid);

    int increasePageViews(Integer hid);

    /**
     * 头条存入数据库
     * @param newsHeadline
     * @return
     */
    int addNewsHeadline(NewsHeadline newsHeadline);

    NewsHeadline findHeadlineByHid(Integer hid);
    int updateNewsHeadline(NewsHeadline newsHeadline);

    int removeByHid(Integer hid);
}
